<?php
	require "akses.php";
	if (!isset($_SESSION)) {session_start();}
	connect();
	$_SESSION['email']=$_POST['email'];
	if (updateEmail($_SESSION['userid'], $_POST['email'])=="") {
		$_SESSION['email']=$_POST['email'];
	} else {
		echo "Error while saving email.";
	}
?>